import server from '../../server/index'
// 请求轮播图的数据
const getCarousel = async () => {
    var data = await server.post('/api/resources/carousel', {})
    return Promise.resolve(data)
}

// 请求热门内容
const getHot = async () => {
    var data = await server.post('/api/product/getHotProduct', { "categoryName": ["手机", "空调"] })
    return Promise.resolve(data)
}

// 请求商品列表
const getGoods = async () => {
    var data = await server.post('/api/product/getPromoProduct', { "categoryName": ["电视机",] })
    return Promise.resolve(data)
}

export {
    getCarousel,
    getHot,
    getGoods
}